﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using NUnit.Framework;
using DomainModel.Entities;
using NHibernate;
using DAl;


namespace NHibernateTest
{
    [TestFixture]
    public class NHibernateSampleFixture
    {
        private ISession _session;
        private SessionManager _helper;
        private NHibernateSample _sample;
        [TestFixtureSetUp]
        public void TestFixtureSetup()
        {
            _helper = new SessionManager();
        }
        [SetUp]
        public void Setup()
        {
            _session = _helper.GetSession();
            _sample = new NHibernateSample(_session);
        }
        [Test]
        public void GetCustomerByIdTest()
        {
            Customer customer = _sample.GetCustomerById(1);
            int customerID = customer.CustomerID;
            Assert.AreEqual(1, customerID);
        }
    }

}
